home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Re REPOST Parts with fixed .1 < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  2.4 KB  |  [TEXT/ttxt]

  1. Subject:     Re: REPOST: Parts with fixed display size
  2. Sent:        9/4/96 10:57 AM
  3. Received:    9/4/96 10:57 AM
  4. From:        motion@nbn.com (Arni McKinley)
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. Hi Oliver,
  10.  
  11. I posted a reply to you on this Aug 27. Here it is again.
  12.  
  13. Containers are supposed to look for a property called
  14. kODPropSuggestedFrameShape when firsat embedding a part. ODFDraw does this,
  15. so does Page Composer. I assume most containers are doing that now. So you
  16. need to write to this property when you first externalize. I put it in our
  17. part content's Externalize(0 method first thing. Something like this:
  18.  
  19.         // Write out a suggested size for frame opening
  20.         ODShape* propFrameShape = new ODShape;
  21.         propFrameShape->Acquire(ev);
  22.         propFrameShape->SetRectangle( ev, &kProposedFrameRect );
  23.  
  24.         ::ODSUForceFocus( ev, storageUnit, kODPropSuggestedFrameShape,
  25. kODPolygon );
  26.         propFrameShape->WriteShape( ev, storageUnit );
  27.  
  28.         ::ODSUForceFocus( ev, storageUnit, kODPropFrameShape, kODPolygon );
  29.         propFrameShape->WriteShape( ev, storageUnit );
  30.  
  31.         propFrameShape->Release(ev);
  32.  
  33. You may come up with a slicker way of doing it, but there it is. The
  34. container will read this property then give the frame this suggested size.
  35.  
  36. After that you manage the frame's shape trhough the regular arbitration
  37. calls to keep the frame the size you want it.
  38.  
  39. Arni
  40.  
  41.  
  42. >I am reposting this, because nobody has answered yet and since that has
  43. >never happened before on this list I suspect that it has been lost during
  44. >the list-outage...
  45. >
  46. >-----------------------------------------------------
  47. >
  48. >
  49. >Hi there,
  50. >
  51. >I hope I can explain this correctly:
  52. >
  53. >We are trying to create a part that has a self determined fixed frame size.
  54. >
  55. >We want the part to enforce its visible area when the user embeds it into
  56. >another part. When you drag the www browser part of Cyberdog into ODF Draw
  57. >it first has a small frame which it expands once it begins to download the
  58. >data.
  59. >
  60. >We want our part to determine its correct display size and then set it
  61. >itself. After that it should prohibit the user from resizing it. The user
  62. >should only be allowed to drag the part around.
  63. >
  64. >How can this be done? Any help is greatly appreciated.
  65. >
  66. >TIA,
  67. >
  68. >Oliver.
  69.  
  70. Arni F. McKinley
  71. President
  72. MetaMind Software, Inc.
  73. Mill Valley, CA 94941
  74. motion@nbn.com
  75. www.nbn.com/people/minds
  76. _______________________________________